/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Cristian
 */
@Entity
@Table(name = "pytctbactmese")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Pytctbactmese.findAll", query = "SELECT p FROM Pytctbactmese p"),
    @NamedQuery(name = "Pytctbactmese.findByPytctbactmeseid", query = "SELECT p FROM Pytctbactmese p WHERE p.pytctbactmeseid = :pytctbactmeseid"),
    @NamedQuery(name = "Pytctbactmese.findByPorcentajejec", query = "SELECT p FROM Pytctbactmese p WHERE p.porcentajejec = :porcentajejec"),
    @NamedQuery(name = "Pytctbactmese.findByAprobdir", query = "SELECT p FROM Pytctbactmese p WHERE p.aprobdir = :aprobdir"),
    @NamedQuery(name = "Pytctbactmese.findByAprobugp", query = "SELECT p FROM Pytctbactmese p WHERE p.aprobugp = :aprobugp"),
    @NamedQuery(name = "Pytctbactmese.findByComentarios", query = "SELECT p FROM Pytctbactmese p WHERE p.comentarios = :comentarios"),
    @NamedQuery(name = "Pytctbactmese.findByFecharegistro", query = "SELECT p FROM Pytctbactmese p WHERE p.fecharegistro = :fecharegistro"),
    @NamedQuery(name = "Pytctbactmese.findByObservaciones", query = "SELECT p FROM Pytctbactmese p WHERE p.observaciones = :observaciones")})
public class Pytctbactmese implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "pytctbactmeseid")
    private Integer pytctbactmeseid;
    @Basic(optional = false)
    @NotNull
    @Column(name = "porcentajejec")
    private double porcentajejec;
    @Basic(optional = false)
    @NotNull
    @Column(name = "aprobdir")
    private boolean aprobdir;
    @Basic(optional = false)
    @NotNull
    @Column(name = "aprobugp")
    private boolean aprobugp;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 300)
    @Column(name = "comentarios")
    private String comentarios;
    @Column(name = "fecharegistro")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecharegistro;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 255)
    @Column(name = "observaciones")
    private String observaciones;
    @JoinColumn(name = "pytctbactmespid", referencedColumnName = "pytctbactmespid")
    @ManyToOne(optional = false)
    private Pytctbactmesp pytctbactmespid;

    public Pytctbactmese() {
    }

    public Pytctbactmese(Integer pytctbactmeseid) {
        this.pytctbactmeseid = pytctbactmeseid;
    }

    public Pytctbactmese(Integer pytctbactmeseid, double porcentajejec, boolean aprobdir, boolean aprobugp, String comentarios, String observaciones) {
        this.pytctbactmeseid = pytctbactmeseid;
        this.porcentajejec = porcentajejec;
        this.aprobdir = aprobdir;
        this.aprobugp = aprobugp;
        this.comentarios = comentarios;
        this.observaciones = observaciones;
    }

    public Integer getPytctbactmeseid() {
        return pytctbactmeseid;
    }

    public void setPytctbactmeseid(Integer pytctbactmeseid) {
        this.pytctbactmeseid = pytctbactmeseid;
    }

    public double getPorcentajejec() {
        return porcentajejec;
    }

    public void setPorcentajejec(double porcentajejec) {
        this.porcentajejec = porcentajejec;
    }

    public boolean getAprobdir() {
        return aprobdir;
    }

    public void setAprobdir(boolean aprobdir) {
        this.aprobdir = aprobdir;
    }

    public boolean getAprobugp() {
        return aprobugp;
    }

    public void setAprobugp(boolean aprobugp) {
        this.aprobugp = aprobugp;
    }

    public String getComentarios() {
        return comentarios;
    }

    public void setComentarios(String comentarios) {
        this.comentarios = comentarios;
    }

    public Date getFecharegistro() {
        return fecharegistro;
    }

    public void setFecharegistro(Date fecharegistro) {
        this.fecharegistro = fecharegistro;
    }

    public String getObservaciones() {
        return observaciones;
    }

    public void setObservaciones(String observaciones) {
        this.observaciones = observaciones;
    }

    public Pytctbactmesp getPytctbactmespid() {
        return pytctbactmespid;
    }

    public void setPytctbactmespid(Pytctbactmesp pytctbactmespid) {
        this.pytctbactmespid = pytctbactmespid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pytctbactmeseid != null ? pytctbactmeseid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pytctbactmese)) {
            return false;
        }
        Pytctbactmese other = (Pytctbactmese) object;
        if ((this.pytctbactmeseid == null && other.pytctbactmeseid != null) || (this.pytctbactmeseid != null && !this.pytctbactmeseid.equals(other.pytctbactmeseid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Pytctbactmese[ pytctbactmeseid=" + pytctbactmeseid + " ]";
    }
    
}
